package com.ktgj.customer.service.impl;

import java.util.List;
import com.ktgj.common.core.utils.DateUtils;
import com.ktgj.customer.domain.OrderTouristDto;
import com.ktgj.customer.domain.OrderTouristVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.customer.mapper.OrderTouristMapper;
import com.ktgj.customer.service.IOrderTouristService;

/**
 * 订单游客Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-10-26
 */
@Service
public class OrderTouristServiceImpl implements IOrderTouristService
{
    @Autowired
    private OrderTouristMapper orderTouristMapper;

    /**
     * 查询订单游客
     * 
     * @param touristId 订单游客ID
     * @return 订单游客
     */
    @Override
    public OrderTouristDto selectOrderTouristById(Long touristId)
    {
        return orderTouristMapper.selectOrderTouristById(touristId);
    }

    /**
     * 查询订单游客列表
     * 
     * @param orderTouristDto 订单游客
     * @return 订单游客
     */
    @Override
    public List<OrderTouristDto> selectOrderTouristList(OrderTouristDto orderTouristDto)
    {
        return orderTouristMapper.selectOrderTouristList(orderTouristDto);
    }

    /**
     * 新增订单游客
     * 
     * @param orderTouristDto 订单游客
     * @return 结果
     */
    @Override
    public int insertOrderTourist(OrderTouristDto orderTouristDto)
    {
        orderTouristDto.setCreateTime(DateUtils.getNowDate());
        return orderTouristMapper.insertOrderTourist(orderTouristDto);
    }

    /**
     * 修改订单游客
     * 
     * @param orderTouristDto 订单游客
     * @return 结果
     */
    @Override
    public int updateOrderTourist(OrderTouristDto orderTouristDto)
    {
        return orderTouristMapper.updateOrderTourist(orderTouristDto);
    }

    /**
     * 批量删除订单游客
     * 
     * @param touristIds 需要删除的订单游客ID
     * @return 结果
     */
    @Override
    public int deleteOrderTouristByIds(Long[] touristIds)
    {
        return orderTouristMapper.deleteOrderTouristByIds(touristIds);
    }

    /**
     * 删除订单游客信息
     * 
     * @param touristId 订单游客ID
     * @return 结果
     */
    @Override
    public int deleteOrderTouristById(Long touristId)
    {
        return orderTouristMapper.deleteOrderTouristById(touristId);
    }

    /**
     * 添加出行人
     * @param orderTouristVo
     * @return
     */
    @Override
    public int addTourist(OrderTouristVo orderTouristVo) {
        return orderTouristMapper.addTourist(orderTouristVo);
    }

    /**
     * 修改出行人
     * @param orderTouristVo
     * @return
     */
    @Override
    public int updateTourist(OrderTouristVo orderTouristVo) {
        return orderTouristMapper.updateTourist(orderTouristVo);
    }
}
